<%@page import="cn.sendto.dbhelper.DBHelper"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@include file="getSession.jsp" %>
<%
	//step1:获取参数
	String id = request.getParameter("id");
	//step2:链接数据库进行操作
	DBHelper helper = new DBHelper();

	String sql = "delete from courseinfo where courseid=?";

	int i = helper.executeSQL(sql, id);
	helper.close();
	if(i>0){
		request.setAttribute("message", "删除成功");
	
		
	}else{
		request.setAttribute("message", "删除失败");
	}
	request.getRequestDispatcher("course_list.jsp").forward(request, response);
	%>